<template>
  <el-dialog
    title="案件详情"
    :visible.sync="dialogVisible"
    custom-class="custom-dialog"
    width="50%"
    :before-close="handleClose"
    @opened="initData"
  >
    <!-- <iframe :src="srcUrl" width="100%" height="400px"></iframe> -->
  </el-dialog>
</template>

<script>
export default {
  props: {
    dialogVisible: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      srcUrl: "",
      caseId: "",
    };
  },
  created() {
    this.$bus.on("caseCodeId", (data) => {
      console.log(data);
      this.caseId = data;
    });
    this.initData();
  },
  methods: {
    initData() {
      // let url = location.href;
      // url = url.match(/access_token=(\S*)&expireTime/)[1];
      // let Url =
      //   `http://192.168.40.100:9090/km/review/km_review_main/kmReviewMain.do?access_token= 
      //   ${url} 
      //   &method=view&fdId=${this.caseId}`;
      // this.srcUrl = Url;
      // console.log(Url)
      //  window.open(Url);
    },

    handleClose() {
      this.$emit("closeDialog");
    },
  },
};
</script>

<style lang="scss" scoped>
</style>